package coreEvent

import (
	"smartconn.cc/tosone/ra_main/store"
)

var err error

// var pageFlipEventUnregister PageFlip.ListenerUnregister

var bookStatus bool

// CoverPushed 封面是否加载
var CoverPushed = false

var runningStatus map[string]string
var lastPageInfo map[string]interface{}

var slaveDB store.Database

// searchRequestParams 搜索封面的参数
type searchRequestParams struct {
	Feature string `json:"feature"`
}

// searchRespParams 搜索封面的返回值
type searchRespParams struct {
	BookID  string `json:"BOOKID"`
	Version string `json:"version"`
	File    string `json:"file"`
	Author  string `json:"author"`
}

func init() {
	runningStatus = map[string]string{}
}

func resetStatus() {
	runningStatus = map[string]string{}
	lastPageInfo = map[string]interface{}{}
}

func setStatus(k, v string) {
	runningStatus[k] = v
}

func getStatus(k string) string {
	return runningStatus[k]
}
